package com.ming.interview;

import java.util.Scanner;

/**
 * @Description 两个乒乓球队进行比赛，各出三人。甲队为a,b,c三人，乙队为x,y,z三人。
 * 已抽签决定比赛名单。有人向队员打听比赛的名单。a说他不和x比，c说他不和x,z比，请编程序找出三队赛手的名单。
 * @Author ye.ming
 * @Date Created in 2019/8/26
 */
public class Main16 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] m = {"a", "b", "c"};
        String[] n = {"x", "y", "z"};
        String result = "";

        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                if (result.contains(m[i]) || result.contains(n[j])) {
                    continue;
                }
                if ((i == 1 && j == 1) || (i == 3 && (j == 1 || j == 3))) {
                    continue;
                } else {
                    result = result + m[i] + n[j];
                }
            }
        }

        System.out.println(result);


    }


    private static void m1(int m, int n) {

    }


}
